import request from '@/utils/request'

// 查询产品入库记录行列表
export function listProductrecptline(query) {
  return request({
    url: '/mes/wm/productrecptline/list',
    method: 'get',
    params: query
  })
}

// 查询产品入库记录行详细
export function getProductrecptline(lineId) {
  return request({
    url: '/mes/wm/productrecptline/' + lineId,
    method: 'get'
  })
}

// 新增产品入库记录行
export function addProductrecptline(data) {
  return request({
    url: '/mes/wm/productrecptline',
    method: 'post',
    data: data
  })
}

// 修改产品入库记录行
export function updateProductrecptline(data) {
  return request({
    url: '/mes/wm/productrecptline',
    method: 'put',
    data: data
  })
}

// 删除产品入库记录行
export function delProductrecptline(lineId) {
  return request({
    url: '/mes/wm/productrecptline/' + lineId,
    method: 'delete'
  })
}

// 获取质检方案数据
export function getInspectionList(id) {
  return request({
    url: '/mes/qc/qcscheme/' + id,
    method: 'get'
  })
}

// 获取质检方案新增的下拉框
export function getoptionList(query) {
  return request({
    url: '/mes/qc/qcscheme/getList',
    method: 'get',
    params: query
  })
}

//质检方案新增的提交
export function addfnameData(data) {
  return request({
    url: '/mes/qc/qcscheme/item/add',
    method: 'post',
    data: data
  })
}

// 质检方案修改的提交
export function updatefnameData(data) {
  return request({
    url: '/mes/qc/qcscheme/update/itme',
    method: 'put',
    data: data
  })
}
// 质检方案删除质检方案
export function deleteFname(id) {
  return request({
    url: '/mes/qc/qcscheme/' + id,
    method: 'delete'
  })
}

// 获取适用范围数据
export function getscopeData(id) {
  return request({
    url: '/mes/qc/qcscheme/getItemList/' + id,
    method: 'get'
  })
}

// 获取适用范围新增的下拉框
export function getscopeList(query) {
  return request({
    url: '/mes/qc/qcscheme/getgrouping',
    method: 'get',
    params: query
  })
}

//适用范围新增的提交
export function addscopeData(data) {
  return request({
    url: '/mes/qc/qcscheme/scope/add',
    method: 'post',
    data: data
  })
}

// 适用范围修改的提交
export function updatescopeData(data) {
  return request({
    url: '/mes/qc/qcscheme/scope/update',
    method: 'put',
    data: data
  })
}

// 适用范围删除质检方案
export function deletescope(id) {
  return request({
    url: '/mes/qc/qcscheme/scope/' + id,
    method: 'delete'
  })
}


// 查询适用范围  物料数据
export function getmaterialList(query) {
  return request({
    url: '/mes/qc/material/list/',
    method: 'get',
    params: query
  })
}


//适用范围 物料数据 新增的提交
export function addmaterialData(data) {
  return request({
    url: '/mes/qc/material/batchadd',
    method: 'post',
    data: data
  })
}

// 适用范围  物料数据 修改的提交
export function updateMaterialData(data) {
  return request({
    url: '/mes/qc/material/edit',
    method: 'put',
    data: data
  })
}

// 适用范围 删除 物料数据
export function deleteMaterial(id) {
  return request({
    url: '/mes/qc/material/remove/' + id,
    method: 'delete'
  })
}